package light.mvc.service.workflow;

import java.util.List;
import java.util.Set;

import light.mvc.model.books.Tmaterial;
import light.mvc.model.sys.Tuser;
import light.mvc.model.workflow.TapproveInfo;
import light.mvc.model.workflow.Tfield;
import light.mvc.model.workflow.Tform;
import light.mvc.model.workflow.TformTemplate;
import light.mvc.pageModel.base.PageFilter;
import light.mvc.pageModel.base.SessionInfo;
import light.mvc.pageModel.base.Tree;
import light.mvc.pageModel.books.Material;
import light.mvc.pageModel.sys.User;
import light.mvc.pageModel.workflow.ApproveInfo;
import light.mvc.pageModel.workflow.FieldPageModel;
import light.mvc.pageModel.workflow.Form;
import light.mvc.pageModel.workflow.FormTemplate;
import light.mvc.pageModel.workflow.TaskView;

public interface FormServiceI {

	public List<FormTemplate> findAll();

	public List<FormTemplate> dataGrid(FormTemplate formTemplate, PageFilter ph);

	public Long count(Tuser tuser);

	public void save(FormTemplate formTemplate);

	public Tform getById(Long id);

	public void submit(Tform form,List<FieldPageModel> fields, String isProxy,String loginName, String name) throws Exception;

	public List<TaskView> findMyTaskViewList(User user);

	public void approve(TapproveInfo approveInfo, String taskId,String outcome) throws Exception;

	public List<Form> getByUser(Tuser tuser);

	public Set<String> getOutcomesByTaskId(String id);

	public List<ApproveInfo> getApproveInfosByFormId(String formId);

	public List<Form> getByUser(Tuser tuser, PageFilter ph);

	/**
	 * @param formId 
	 * @return
	 */
	public List<Tfield> getTfieldsByTaskId(String taskId, String formId);

}
